package com.tm.media.controller;

import com.tm.login.result.Result;
import com.tm.media.model.vo.NewVo;
import com.tm.media.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author Ly
 * @Data 2023/2/25 17:01
 * @ClassName StatisticsController
 */
@RestController
@RequestMapping("api/v1/statistics")
public class StatisticsController {
    @Autowired
    private StatisticsService statisticsService;
    @PostMapping("news")
    public Result news(@RequestBody NewVo newVo){
     return statisticsService.news(newVo);
    }
    //粉丝概况
    @PostMapping("fans")
    public Result fans(@RequestBody  NewVo newVo){
        return statisticsService.fans(newVo);
    }

}
